//
//  ContentTableViewCell.m
//  XRSquare
//
//  Created by UaenaMo on 2018/8/8.
//  Copyright © 2018年 UaenaMo. All rights reserved.
//

#import "TextContentTableViewCell.h"

@interface TextContentTableViewCell()
{
    UILabel * titleLabel;
    UIView *line;
    UIImageView * icon;
}
@end

@implementation TextContentTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(15, 15, ScreenWidth, 20)];
        titleLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:titleLabel];
        
        line = [[UIView alloc]initWithFrame:CGRectMake(0, 49, ScreenWidth, 1)];
        line.backgroundColor = [UIColor colorFromHexCode:@"f3f3f3"];
        [self addSubview:line];
        
        icon = [[UIImageView alloc]initWithFrame:CGRectMake(ScreenWidth - 20 - 20, 15, 20, 20)];
        [self addSubview:icon];
    }
    return self;
}

+(CGFloat)height
{
    return 50;
}

-(void)loadString:(NSString *)string iamge:(UIImage *)image
{
    titleLabel.text = string;
    icon.image = image;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
